package buddha.jvmabi;

public final class OpcodeConst {
    public static final byte NOP                   = 0x00;
    // push a constant value to the operand stack
    public static final byte A_CONST_NULL          = 0x01;
    public static final byte I_CONST_M1            = 0x02;
    public static final byte I_CONST_0             = 0x03;
    public static final byte I_CONST_1             = 0x04;
    public static final byte I_CONST_2             = 0x05;
    public static final byte I_CONST_3             = 0x06;
    public static final byte I_CONST_4             = 0x07;
    public static final byte I_CONST_5             = 0x08;
    public static final byte L_CONST_0             = 0x09;
    public static final byte L_CONST_1             = 0x0A;
    public static final byte F_CONST_0             = 0x0B;
    public static final byte F_CONST_1             = 0x0C;
    public static final byte F_CONST_2             = 0x0D;
    public static final byte D_CONST_0             = 0x0E;
    public static final byte D_CONST_1             = 0x0F;
    // push an immediate number to the operand stack
    public static final byte BI_PUSH               = 0x10;
    public static final byte SI_PUSH               = 0x11;
    // load constant from constant pool
    public static final byte LDC                   = 0x12;
    public static final byte LDC_W                 = 0x13;
    public static final byte LDC_2_W               = 0x14;
    // load value from local variables table
    public static final byte I_LOAD                = 0x15;
    public static final byte L_LOAD                = 0x16;
    public static final byte F_LOAD                = 0x17;
    public static final byte D_LOAD                = 0x18;
    public static final byte A_LOAD                = 0x19;
    public static final byte I_LOAD_0              = 0x1A;
    public static final byte I_LOAD_1              = 0x1B;
    public static final byte I_LOAD_2              = 0x1C;
    public static final byte I_LOAD_3              = 0x1D;
    public static final byte L_LOAD_0              = 0x1E;
    public static final byte L_LOAD_1              = 0x1F;
    public static final byte L_LOAD_2              = 0x20;
    public static final byte L_LOAD_3              = 0x21;
    public static final byte F_LOAD_0              = 0x22;
    public static final byte F_LOAD_1              = 0x23;
    public static final byte F_LOAD_2              = 0x24;
    public static final byte F_LOAD_3              = 0x25;
    public static final byte D_LOAD_0              = 0x26;
    public static final byte D_LOAD_1              = 0x27;
    public static final byte D_LOAD_2              = 0x28;
    public static final byte D_LOAD_3              = 0x29;
    public static final byte A_LOAD_0              = 0x2A;
    public static final byte A_LOAD_1              = 0x2B;
    public static final byte A_LOAD_2              = 0x2C;
    public static final byte A_LOAD_3              = 0x2D;
    public static final byte IA_LOAD               = 0x2E;
    public static final byte LA_LOAD               = 0x2F;
    public static final byte FA_LOAD               = 0x30;
    public static final byte DA_LOAD               = 0x31;
    public static final byte AA_LOAD               = 0x32;
    public static final byte BA_LOAD               = 0x33;
    public static final byte CA_LOAD               = 0x34;
    public static final byte SA_LOAD               = 0x35;
    // store value to local variables table
    public static final byte I_STORE               = 0x36;
    public static final byte L_STORE               = 0x37;
    public static final byte F_STORE               = 0x38;
    public static final byte D_STORE               = 0x39;
    public static final byte A_STORE               = 0x3A;
    public static final byte I_STORE_0             = 0x3B;
    public static final byte I_STORE_1             = 0x3C;
    public static final byte I_STORE_2             = 0x3D;
    public static final byte I_STORE_3             = 0x3E;
    public static final byte L_STORE_0             = 0x3F;
    public static final byte L_STORE_1             = 0x40;
    public static final byte L_STORE_2             = 0x41;
    public static final byte L_STORE_3             = 0x42;
    public static final byte F_STORE_0             = 0x43;
    public static final byte F_STORE_1             = 0x44;
    public static final byte F_STORE_2             = 0x45;
    public static final byte F_STORE_3             = 0x46;
    public static final byte D_STORE_0             = 0x47;
    public static final byte D_STORE_1             = 0x48;
    public static final byte D_STORE_2             = 0x49;
    public static final byte D_STORE_3             = 0x4A;
    public static final byte A_STORE_0             = 0x4B;
    public static final byte A_STORE_1             = 0x4C;
    public static final byte A_STORE_2             = 0x4D;
    public static final byte A_STORE_3             = 0x4E;
    public static final byte IA_STORE              = 0x4F;
    public static final byte LA_STORE              = 0x50;
    public static final byte FA_STORE              = 0x51;
    public static final byte DA_STORE              = 0x52;
    public static final byte AA_STORE              = 0x53;
    public static final byte BA_STORE              = 0x54;
    public static final byte CA_STORE              = 0x55;
    public static final byte SA_STORE              = 0x56;
    // operand stack related opcode
    public static final byte POP                   = 0x57;
    public static final byte POP_2                 = 0x58;
    public static final byte DUP                   = 0x59;
    public static final byte DUP_X1                = 0x5A;
    public static final byte DUP_X2                = 0x5B;
    public static final byte DUP_2                 = 0x5C;
    public static final byte DUP_2_X1              = 0x5D;
    public static final byte DUP_2_X2              = 0x5E;
    public static final byte SWAP                  = 0x5F;
    // arithmetic & shift & bit-logic opcode
    public static final byte I_ADD                 = 0x60;
    public static final byte L_ADD                 = 0x61;
    public static final byte F_ADD                 = 0x62;
    public static final byte D_ADD                 = 0x63;
    public static final byte I_SUB                 = 0x64;
    public static final byte L_SUB                 = 0x65;
    public static final byte F_SUB                 = 0x66;
    public static final byte D_SUB                 = 0x67;
    public static final byte I_MUL                 = 0x68;
    public static final byte L_MUL                 = 0x69;
    public static final byte F_MUL                 = 0x6A;
    public static final byte D_MUL                 = 0x6B;
    public static final byte I_DIV                 = 0x6C;
    public static final byte L_DIV                 = 0x6D;
    public static final byte F_DIV                 = 0x6E;
    public static final byte D_DIV                 = 0x6F;
    public static final byte I_REM                 = 0x70;
    public static final byte L_REM                 = 0x71;
    public static final byte F_REM                 = 0x72;
    public static final byte D_REM                 = 0x73;
    public static final byte I_NEG                 = 0x74;
    public static final byte L_NEG                 = 0x75;
    public static final byte F_NEG                 = 0x76;
    public static final byte D_NEG                 = 0x77;
    public static final byte I_SHL                 = 0x78;
    public static final byte L_SHL                 = 0x79;
    public static final byte I_SHR                 = 0x7A;
    public static final byte L_SHR                 = 0x7B;
    public static final byte IU_SHR                = 0x7C;
    public static final byte LU_SHR                = 0x7D;
    public static final byte I_AND                 = 0x7E;
    public static final byte L_AND                 = 0x7F;
    public static final byte I_OR                  = (byte) 0x80;
    public static final byte L_OR                  = (byte) 0x81;
    public static final byte I_XOR                 = (byte) 0x82;
    public static final byte L_XOR                 = (byte) 0x83;
    public static final byte I_INC                 = (byte) 0x84;
    // type cast opcode
    public static final byte I2L                   = (byte) 0x85;
    public static final byte I2F                   = (byte) 0x86;
    public static final byte I2D                   = (byte) 0x87;
    public static final byte L2I                   = (byte) 0x88;
    public static final byte L2F                   = (byte) 0x89;
    public static final byte L2D                   = (byte) 0x8A;
    public static final byte F2I                   = (byte) 0x8B;
    public static final byte F2L                   = (byte) 0x8C;
    public static final byte F2D                   = (byte) 0x8D;
    public static final byte D2I                   = (byte) 0x8E;
    public static final byte D2L                   = (byte) 0x8F;
    public static final byte D2F                   = (byte) 0x90;
    public static final byte I2B                   = (byte) 0x91;
    public static final byte I2C                   = (byte) 0x92;
    public static final byte I2S                   = (byte) 0x93;
    // compare opcode
    public static final byte L_CMP                 = (byte) 0x94;
    public static final byte F_CMP_L               = (byte) 0x95;
    public static final byte F_CMP_G               = (byte) 0x96;
    public static final byte D_CMP_L               = (byte) 0x97;
    public static final byte D_CMP_G               = (byte) 0x98;
    // condition transfer opcode
    public static final byte IF_EQ                 = (byte) 0x99;
    public static final byte IF_NE                 = (byte) 0x9A;
    public static final byte IF_LT                 = (byte) 0x9B;
    public static final byte IF_GE                 = (byte) 0x9C;
    public static final byte IF_GT                 = (byte) 0x9D;
    public static final byte IF_LE                 = (byte) 0x9E;
    public static final byte IF_ICMP_EQ            = (byte) 0x9F;
    public static final byte IF_ICMP_NE            = (byte) 0xA0;
    public static final byte IF_ICMP_LT            = (byte) 0xA1;
    public static final byte IF_ICMP_GE            = (byte) 0xA2;
    public static final byte IF_ICMP_GT            = (byte) 0xA3;
    public static final byte IF_ICMP_LE            = (byte) 0xA4;
    public static final byte IF_ACMP_EQ            = (byte) 0xA5;
    public static final byte IF_ACMP_NE            = (byte) 0xA6;
    public static final byte GOTO                  = (byte) 0xA7;
    public static final byte JSR                   = (byte) 0xA8;
    public static final byte RET                   = (byte) 0xA9;
    public static final byte TABLE_SWITCH          = (byte) 0xAA;
    public static final byte LOOKUP_SWITCH         = (byte) 0xAB;
    // return opcode
    public static final byte I_RETURN              = (byte) 0xAC;
    public static final byte L_RETURN              = (byte) 0xAD;
    public static final byte F_RETURN              = (byte) 0xAE;
    public static final byte D_RETURN              = (byte) 0xAF;
    public static final byte A_RETURN              = (byte) 0xB0;
    public static final byte RETURN                = (byte) 0xB1;
    // object opcode
    public static final byte GET_STATIC            = (byte) 0xB2;
    public static final byte PUT_STATIC            = (byte) 0xB3;
    public static final byte GET_FIELD             = (byte) 0xB4;
    public static final byte PUT_FIELD             = (byte) 0xB5;
    // method invoke opcode
    public static final byte INVOKE_VIRTUAL        = (byte) 0xB6;
    public static final byte INVOKE_SPECIAL        = (byte) 0xB7;
    public static final byte INVOKE_STATIC         = (byte) 0xB8;
    public static final byte INVOKE_INTERFACE      = (byte) 0xB9;
    public static final byte INVOKE_DYNAMIC        = (byte) 0xBA;
    // object creation & array operations & misc
    public static final byte NEW                   = (byte) 0xBB;
    public static final byte NEW_ARRAY             = (byte) 0xBC;
    public static final byte A_NEW_ARRAY           = (byte) 0xBD;
    public static final byte ARRAY_LENGTH          = (byte) 0xBE;
    public static final byte A_THROW               = (byte) 0xBF;
    public static final byte CHECK_CAST            = (byte) 0xC0;
    public static final byte INSTANCE_OF           = (byte) 0xC1;
    public static final byte MONITOR_ENTER         = (byte) 0xC2;
    public static final byte MONITOR_EXIT          = (byte) 0xC3;
    public static final byte WIDE                  = (byte) 0xC4;
    public static final byte MULTI_A_NEW_ARRAY     = (byte) 0xC5;
    public static final byte IF_NULL               = (byte) 0xC6;
    public static final byte IF_NON_NULL           = (byte) 0xC7;
    public static final byte GOTO_W                = (byte) 0xC8;
    public static final byte JSR_W                 = (byte) 0xC9;
    public static final byte BREAK_POINT           = (byte) 0xCA;

    public static final byte ILLEGAL               = (byte) 0xFF;
}
